package edu.fatec.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.swing.text.StyledEditorKit.BoldAction;

public class ResourceManager {
	
	public static Connection getConnection(){
		Connection con = null;
		try{
			String driver = "com.mysql.jdbc.Driver";
			String url = "jdbc:mysql://localhost:3306/LojaVirtual";
			String password = "caio";
			String user = "root";
			Class.forName(driver);
			con = DriverManager.getConnection(url,user,password);
		}catch  (SQLException exception) {
			exception.printStackTrace();
		} catch (ClassNotFoundException exception) {
			// TODO Auto-generated catch block
			exception.printStackTrace();
		}
		return con;
	}
	
	public static void main(String...args){
		Connection connection = ResourceManager.getConnection();
		
	}
}
